package 软件工程实验三.A1.A11;

import java.text.ParseException;

public class Client {
    public static void main(String[] args) throws ParseException {
        // 创建三个Thoroughbred对象
        Thoroughbred blackThoroughbred = new Thoroughbred(DateUtils.parseDate("2020-01-01"),"black Thoroughbred");
        Thoroughbred whiteThoroughbred = new Thoroughbred(DateUtils.parseDate("2020-01-02"),"white Thoroughbred");
        Thoroughbred pandaThoroughbred = new Thoroughbred(DateUtils.parseDate("2023-01-03"),"panda Thoroughbred");
        // 设置pandaThoroughbred的父母
        pandaThoroughbred.setMother(whiteThoroughbred);
        pandaThoroughbred.setFather(blackThoroughbred);

        // 打印pandaThoroughbred的年龄和父母
        System.out.println("pandaThoroughbred age:"+pandaThoroughbred.getCurrentAge());
        System.out.println("pandaThoroughbred Father:"+pandaThoroughbred.getFather());
        System.out.println("pandaThoroughbred Father:"+pandaThoroughbred.getMother());
        System.out.println(pandaThoroughbred);
    }
}
